//
//  NSString+TYCBase64.m
//  TYCWeiBo
//
//  Created by tangyunchuan on 2018/9/11.
//  Copyright © 2018年 中发. All rights reserved.
//

#import "NSString+TYCBase64.h"

@implementation NSString (TYCBase64)

- (NSString *)tyc_base64Encode {
    NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding];
    
    return [data base64EncodedStringWithOptions:0];
}


- (NSString *)tyc_base64Decode {
    NSData *data = [[NSData alloc] initWithBase64EncodedString:self options:0];
    
    return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}
@end
